<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../bootstrap-5.1.3-dist/css/bootstrap.css">
    <script src="../bootstrap-5.1.3-dist/js/bootstrap.js"></script>
</head>

<body class="container">
    <h3 align="center">定义弹性盒子</h3>
    <h4>使用d-flex类创建弹性盒子</h4>
    <!--使用d-flex类创建弹性盒子-->
    <div class="d-flex p-3 bg-warning text-white">
        <div class="p-2 bg-primary">首页</div>
        <div class="p-2 bg-success">在线课程</div>
        <div class="p-2 bg-danger">加入会员</div>
    </div><br />
    <h4>使用d-inline-flex类创建弹性盒子</h4>
    <!--使用d-inline-flex类创建弹性盒子-->
    <div class="d-inline-flex p-3 bg-warning text-white">
        <div class="p-2 bg-primary">首页</div>
        <div class="p-2 bg-success">在线课程</div>
        <div class="p-2 bg-danger">加入会员</div>
    </div>
</body>

</html>